/*
 * Serum
 *
 * @license      GNU Lesser General Public Licence see LICENCE-LGPL file or http://www.gnu.org/licenses/lgpl.html
 */

/**
 * Languages helper
 */
Serum.Languages = function() {
    var _instance = null;

    /**
     * Constructor
     */
    var __construct = function() {
        return {
            /**
             * Bundles
             */
            values:    {},

            /**
             * Loads languages
             *
             * @param   {Object}    languages
             */
            load: function(languages) {
                for (var _language in languages) {
                    this.values[_language] = languages[_language];
                }
            },

            /**
             * Retrieves values
             *
             * @return  {Object}
             */
            getValues: function() {
                return this.values;
            }
        }
    };

    return {
        /**
         * Returns instance
         *
         * @return  {Serum.Packages}    Instance
         */
        get: function() {
            if (_instance === null) {
                _instance = __construct();
            }
            return _instance;
        }
    };
}();